package com.onec.service.api.enums;

/**
 * 交易订单规则配置：
 * 新增一条交易规则，将service 的name 配置到此处；
 *
 * @author ONEC
 */

public enum ServiceTradeEnum {

    AGENT_NAME_LIMIT_SERVICE("机构注册商户敏感信息限制配置"),
    AGENT_ID_CARD_LIMIT_SERVICE("机构注册商户数限制配置"),
    MERCHANT_AMOUNT_LIMIT_SERVICE("商户交易金额限制配置"),
    MERCHANT_BLOCK_INFO_SERVICE("商户敏感信息是否在黑名单中配置"),

    ;

    private String message;

    ServiceTradeEnum(String message) {
        this.message = message;
    }

    /**
     * 判断是否包含在枚举里边：
     *
     * @param serviceName
     * @return boolean
     */
    public static boolean isInclude(String serviceName) {
        for (ServiceTradeEnum serviceTypeEnum : ServiceTradeEnum.values()) {
            if (serviceTypeEnum.name().equals(serviceName)) {
                return true;
            }
        }
        return false;
    }

    public String getMessage() {
        return message;
    }
}
